﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HalconDisplayControl.Attributes;
using HalconDotNet;

namespace HalconDisplayControl.Shape
{
    public class XldShape : IShape
    {
        [ParamName("row")]
        public double[] Row { get; set; } = new double[] { 100, 200, 200, 100 };
        [ParamName("column")]
        public double[] Column { get; set; } = new double[] { 100, 100, 200, 200 };

        public void CreateDrawingObj(out HTuple drawId)
        {
            HOperatorSet.CreateDrawingObjectXld(Row, Column, out drawId);
        }

        public void CreateShapeObj(out HObject shapeObj)
        {
            HOperatorSet.GenContourPolygonXld(out shapeObj, Row, Column);
        }
    }
}
